DOCUMENT=informe
BUILD= pdflatex -halt-on-error
all: rebuild
clean:
	rm -f $(DOCUMENT).pdf $(DOCUMENT).aux $(DOCUMENT).toc $(DOCUMENT).bbl $(DOCUMENT).blg $(DOCUMENT).loa $(DOCUMENT).log
clear: clean

rebuild: clear show

compile: clean $(DOCUMENT).pdf

$(DOCUMENT).pdf:
	$(BUILD) $(DOCUMENT).tex && bibtex $(DOCUMENT).aux\
	       	&& $(BUILD) $(DOCUMENT).tex && $(BUILD) $(DOCUMENT).tex
show: $(DOCUMENT).pdf
	evince $(DOCUMENT).pdf &
